package com.mhgis.dog.server;

import java.util.List;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;


import org.springframework.transaction.annotation.Transactional;


@Service("dogService")
public class DogService   {



  @Autowired
  private DogRepository repository;

  @Transactional( propagation = Propagation.REQUIRED)
  public Dog save(Dog dog) {
    return repository.save(dog);
  }

  @Transactional( propagation = Propagation.NOT_SUPPORTED)
  public List<Dog> findAll() {
    return repository.findAll();
  }
  
  @Transactional( propagation = Propagation.NOT_SUPPORTED)
  public Long getNewID() {
    return repository.getNewID();
  }
  

}